function AllReady() {
    var mstform = Ext.getCmp('ProjResM');
    var dgrid = Ext.getCmp('ProjResD');
    var dstore = dgrid.store;
    mstform.getItem('PhidCblx').setValue('6870000000000032')
    BatchBindCombox([mstform.getItem('PhidCblx')]);


    dstore.on('add', function (store, records, index, e0pts) {
        for (i = 0; i < records.length; i++) {
            records[i].set('ResControl', '2');
            records[i].set('ZjeControl', '3');
        }
    });

    dgrid.addListener('edit', function (editor, e) {
        const record = e.record;
        const Qty = (Number(record.get("Qty")) || 0)
        const user_deshl = (Number(record.get("user_deshl")) || 0)
        const user_xeshl = (Number(record.get("user_xeshl")) || 0)
        record.set("user_desl",Qty*(1+user_deshl))
        record.set("user_xesl",Qty*(1+user_xeshl))
        dgrid.getView().refresh()
    });
} 